package models;

import javax.persistence.Embeddable;

@Embeddable
public class GULinkPK
{
    public String id_user;
    public String id_group;
    
    public boolean equals(Object object)
    {
	if (object instanceof GULinkPK)
	{
	    GULinkPK linkPK = (GULinkPK) object;
	    return id_user.equals(linkPK.id_user)
		    && id_group.equals(linkPK.id_group);
	}
	else
	{
	    return false;
	}
    }

    public int hashCode()
    {
	return (int) (id_user + id_group).hashCode();
    }
}
